package com.wing.purchase.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.purchase.model.entity.PurchasePlan;
import com.wing.purchase.model.entity.PurchasePlanDetail;
import com.wing.purchase.model.request.PurchasePlanForm;
import com.wing.purchase.model.response.PurchasePlanVO;

import java.util.List;
import java.util.Map;

/**
 * 领料计划-Service
 *
 * @author
 */
public interface PurchasePlanService extends IService<PurchasePlan> {

    /**
     * 添加
     *
     * @param purchasePlanForm
     * @return
     */
    int add(PurchasePlanForm purchasePlanForm);

    /**
     * 修改
     *
     * @param purchasePlan
     * @return
     */
    int update(PurchasePlan purchasePlan);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<PurchasePlanVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<PurchasePlanVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    PurchasePlanVO get4appById(Long id);

    /**
     * 删除
     * @param purchasePlanId
     * @return
     */
    boolean delete(Long purchasePlanId);

    /**
     * 获取领料计划明细
     * @param planId
     * @return
     */
    List<PurchasePlanDetail> getDetailInfo(Integer planId);

    /**
     * 确认领料计划
     * @param id
     * @return
     */
    int confirm(Integer id);

    /**
     * 审核领料计划
     * @param purchasePlan
     * @return
     */
    int audit(PurchasePlan purchasePlan);

    /**
     * 修改领料计划
     * @param purchasePlanForm
     * @return
     */
    int updateInfoBy(PurchasePlanForm purchasePlanForm);

    /**
     * 获取部门详情信息
     * @param id
     * @return
     */
    PurchasePlanVO getDetailBy(Integer id);
}
